package com.example.qy.mapper;

import com.example.lxy.pojo.user;
import com.example.qy.pojo.wyf;
import com.example.zyh.pojo.Home;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WyfMapper {
    @Select("select w.ysf,w.ssf,w.fj,w.sfl from wyf w inner join user u on u.uid=w.uid where u.username =#{u.username}")
    public List<wyf> select(String username);
    @Select("select * from wyf")
    public List<wyf> selectall();
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('1'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add1(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('2'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add2(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('3'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add3(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('4'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add4(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('5'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add5(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('6'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add6(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('7'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add7(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username ='#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('8'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add8(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('9'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add9(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('10'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add10(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('11'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add11(wyf wyf);
    @Insert("insert into wyf (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('12'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add12(wyf wyf);
    @Delete("delete from wyf where uid=#{uid}")
    public void delete(int uid);






}
